﻿Public Partial Class Contatti
    Inherits System.Web.UI.Page
    Public pagetitle As String = ConfigurationManager.AppSettings("sitename")
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Page.Title = pagetitle & " - Contatti"
    End Sub
    Private Sub btnsend_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnsend.Click
        Dim mail As New Helpers.Mail
        Dim cmn As New Helpers.Common
        mail.SendMail(txtEmail.Text.Trim, txtNome.Text.Trim, ConfigurationManager.AppSettings("smtpSendEmail"), _
                      txtOggetto.Text, txtMessaggio.Text.Trim)
        txtEmail.Text = String.Empty
        txtMessaggio.Text = String.Empty
        txtNome.Text = String.Empty
        txtOggetto.Text = "Richiesta informazioni"
        ClientScript.RegisterClientScriptBlock(Me.GetType, "script1", _
                                               cmn.OpenDialog("E-mail inviata correttamente!"), True)
    End Sub
End Class